package com.demo.service.impl;

import com.demo.dao.ShangPingDao;
import com.demo.domain.Shangping;
import com.demo.service.ShangPingService;

import java.util.List;

/**
 * @Version 2019
 * @Author:kele
 * @Date:2020/4/19
 * @Content:
 */
public class ShangpingServiceImpl implements ShangPingService {

    private ShangPingDao shangPingDao;

    public void setShangPingDao(ShangPingDao shangPingDao) {
        this.shangPingDao = shangPingDao;
    }

    //保存商品信息
    @Override
    public void saveShangping(Shangping shangping) {
        shangPingDao.saveShangping(shangping);
    }

    //查询所有商品信息
    @Override
    public List<Shangping> find() {
        return shangPingDao.find();

    }

    //通过id查询
    @Override
    public Shangping findOne(int s_id) {
        return shangPingDao.findOne(s_id);
    }

    //删除
    @Override
    public void delete(Shangping s) {
        shangPingDao.delete(s);
    }

    @Override
    public void update(Shangping shangping) {
        shangPingDao.update(shangping);
    }

    @Override
    public List<Shangping> findMoreCondition(Shangping shangping) {
        return shangPingDao.findMoreCondition(shangping);
    }
}
